<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <title></title>
    <!--[if lt IE 8]>
        <script>
            if (typeof document.querySelector === 'undefined') {
                document.querySelector = function (target) {
                    return document.getElementsByTagName(target)[0] || null;
                }
            }
        </script>
    <![endif]-->

    <!--[if lt IE 9]>
        <script src="./add-on/IE9.js"></script>
    <![endif]-->
    <script>
        Function.prototype.bind || functionPrototypeBind();
        function functionPrototypeBind() {
            var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
            var slice = Array.prototype.slice;
            var toStr = Object.prototype.toString;
            var funcType = '[object Function]';
            Function.prototype.bind = function (that) {
                var target = this;
                if (typeof target !== 'function' || toStr.call(target) !== funcType) {
                    throw new TypeError(ERROR_MESSAGE + target);
                }
                var args = slice.call(arguments, 1);
    
                var bound;
                var binder = function () {
                    if (this instanceof bound) {
                        var result = target.apply(
                            this,
                            args.concat(slice.call(arguments))
                        );
                        if (Object(result) === result) {
                            return result;
                        }
                        return this;
                    } else {
                        return target.apply(
                            that,
                            args.concat(slice.call(arguments))
                        );
                    }
                };
    
                var boundLength = Math.max(0, target.length - args.length);
                var boundArgs = [];
                for (var i = 0; i < boundLength; i++) {
                    boundArgs.push('$' + i);
                }
    
                bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
    
                if (target.prototype) {
                    var Empty = function Empty() {};
                    Empty.prototype = target.prototype;
                    bound.prototype = new Empty();
                    Empty.prototype = null;
                }
    
                return bound;
            };
        }
    </script>
</head>

<body>
    <div id="root"></div>
</body>

</html>